Overrun: The worker er hardware is unable to hand receive ed data to a hardware buffer because the input rate exceeds the receivers ability to handle the data.
(Packet loss occurs because the input speed of the interface exceeds the processing
Snd_pcm_readi ()
snd_pcm_sframes_t Snd_pcm_readi (snd_pcm_t *pcm,
void* Buffer,
snd_pcm_uframes_t size
)
Read interleaved frames from a PCM.
Parameters:
Pcm
PCM handle
Buffer
Frames containing buffer
Size
Frames to be read
Returns:A positive number of frames actually read otherwise a negative error code
Return values:
-ebadfd
The PCM is isn't in the right state (snd_pcm_state_prepared or snd_pcm_st
16384Periods 128Rate 44100}Bindings {0 01 1}}For configuration, refer to this web site:Http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.htmlFor Period_size and Buffer_size, be aware that I modified them to 1024, 8192. On our platform with DMIX will appear underrun!!! Information.2 ALSA Kernel2.1 DirectoryAlsa-driver includes many drivers in development and support for some 2.2,2.4 Linux kernel versions. When these drivers are stabilized, the
hardware buffers and application cache intervals. But there are exceptions. In the recording example, if the application does not read the data quickly enough, the loop buffers will be overwritten with the new data. The loss of this data is known as overrun. In the playback example, if the application writes data to a buffer that is not fast enough, the buffer will "starve". Such errors are referred to as "underrun". In ALSA documentation, these two
user calls writei and READI on the upper layer, overrun (data is full during recording and not read by ALSA driver) and underrun (data is required for playing) will be generated, the ALSA driver does not write data), collectively referred to as xrun. What I understand is that not an interruption caused by a period is called xrun, but the whole hardwareWhen the buffer is full (when record is used) or empty (when play is used), xrun is used only when t
packet identifier check failure (defined for backward compatibility with the USB 1.0).
Usbd_status_unexpected_pid
0xc0000007
The device returned an unexpected packet identifier error (defined for backward compatibility with the USB 1.0).
Usbd_status_data_overrun
0xc0000008
The device returned a data overrun error (defined for backward compatibility with the USB 1.0).
Usbd_status_data_underrun
0xc0000009
The device returned a data
shoulder.
2> column synchronization (vertical synchronization) and field width
3> Scanning
4> pixels
5> RGB
6> grayscale
7> wishbone's burst access
8> dual BUFFER MECHANISM
9> alpha blanking
10> FIFO underrun and overrun
11> essential functions of the palette
4. Overall simulation structure
To simulate the vga_eng_top module, you need to establish the necessary simulation models and connect them.
5. simulation process
Status Register (Interrupt Status Register)
7-6: iomode: processor mode. 00 is in 16-Bit mode, 01 is in 32-Bit mode, 10 is in 8-Bit mode, and 00 is retained.
5: lnkchg: the connection status changes.
4: udrun: transmit "underrun"
3: Roos: receives overflow counters.
2: ROS: receive overflow.
1: PTS: data packet transmission.
0: PRS: receives data packets.
ISR register write 1 in each status clear
IMR (FFH): terminal mask register (Interrupt Mask regi
Purpose of reloading new and delete:● Monitor memory usage.1> there is no one-to-one relationship between new and delete. New has more memory leakage, while Delete has more, leading to undefined behavior. In this case, a new with log is required.2> overrun and underrun. When writing data to the memory, it is written outside the buffer zone. In this case, you need to apply for a slightly larger space storage flag.● Improve Memory Allocation Efficiency●
Features for DVD:Driveropts=burnfree: Open the Write function of buffer underrun free mode-sao: Support for DVD-RW format4, DD can back up the complete partition or disk, because DD can read the disk sector surface dataDD if= "input file" of= "Output File" bs= "Block Size" count= "number"If: is the input fileOf: is the output fileBS: The size of a block planned, the default is 512bytes if specifiedCount: How many BS means5, Cpio can note anything, cp
. Fastmixer first maintains a state machine, and the fastmixer runs in its own thread, so thread synchronization is required. Here, the State is used to control the workflow of fastmixer. Due to multithreading, the audio underrun and overrun statuses (do not know what it is? See the reference books mentioned above !) It is also a tough issue to deal. In addition, a MT object carries an audiomixer object, which completes data mixing, downconversion, an
, void * user, void * info) {If (event! = Audiotrack: event_more_data) return; audiotrack: Buffer * buffer = static_cast
This function first determines whether the event type is event_more_data. If yes, the subsequent code will fill in the corresponding audio data and return it. Of course, you can handle other events. The following are available event types.Java code:
enum event_type { EVENT_MORE_DATA = 0, // Request to write more data to PCM buffer. EVENT_UNDERRUN = 1, // PCM buffer
the user Writei and Readi will not happen, it does not cache the data. If no user calls Writei and Readi at the top, then the overrun will be generated (when recording, the data is full, not yet read by the ALSA driver) and underrun (need data to play, ALSA Drive does not write data), collectively known as Xrun.When xrun occurs, you can stop audio interface when the free space exceeds the stop threshold.You can also set silence threshold to hardware
Reading Notes Objective c ++ Item 50 it makes sense to know when to replace new and delete, too tiveitem1. Three common reasons for customizing new and delete
Let's first review the basic principles. Why do people want to replace the operator new and operator delete versions provided by the compiler at the beginning? There are three common causes:
To detect memory usage errors. Memory leakage may occur when the new memory cannot be deleted successfully. When you use a delete statement more tha
The following is my summary when I changed ST's Custom_HID routine to a "Custom USB device" routine, because I just learned about USB development, and some understanding errors are inevitable, please correct me.
1. usb_desc.c File
Modify according to the communication method used by your program. The usb_desc.h file defines the size of the array in the usb_desc.c file, the endpoint to be processed under ConfigDescriptor [SIZ_CONFIG_DESC], and the report Descriptor (mainly used for HID) should be
judging standard is whether the track set the Track_fast sign (cool, there is no place in JB currently used this symbol). This part of the judgment is more complicated. First Fastmixer maintains a state machine, and in addition, this fastmixer runs in its own thread, so thread synchronization is a must. The state is used here to control the Fastmixer workflow. Because of the multi-threading involved, so the underrun,overrun state of the audio (do not
option to write to the CD/DVD, and common options include:-data: Specifies that subsequent files are written in data format, not in CD tracks (-audio)Speed=x: Specifies the burning speed, for example, the CD is available with a speed=40 of 40 times times, and the DVD is available speed=4-eject: Specifies that the disc is automatically exited when burning is completeFs=ym: Specifies how much buffer memory is available for staging the image file to the buffer memory first. Preset to 4m, general r
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.